home *** CD-ROM | disk | FTP | other *** search
- PC Bible Atlas for Windows
- Dynamic Data Exchange Specification
- January, 1996
-
- *********************************************************************
- INTRODUCTION
- *********************************************************************
-
- This document specifies the Dynamic Data Exchange (DDE) support
- provided by PC Bible Atlas for Windows (PCBA/Win). DDE is a method
- whereby two applications can communicate with one another using a
- standardized format. The two applications can share data as well as
- send and respond to commands that specific actions be performed.
-
- In every DDE conversation, one application is called the "client
- application" and the other is called the "server application." The
- client is the application that begins the conversation, requests data
- from the other application, and sends commands to the other
- application. The server application is the application that provides
- data to the client or that performs actions requested by the client.
- PC Bible Atlas for Windows is capable of being both a DDE client and a
- DDE server. For example, when PC Bible Atlas requests that QuickVerse
- for Windows (QV/Win) show a map containing a city, then PC Bible Atlas
- is acting as a DDE client. When another program requests that
- PC Bible Atlas perform a search for a location, PC Bible Atlas acts as
- a DDE server. This document provides specifications for both server
- and client DDE capability supported by PC Bible Atlas.
-
- For specific information on using DDE with PC Bible Atlas and another
- application, refer to this document and the other application's
- documentation. For specific information on how to write your own
- program that uses DDE, refer to chapter 15 of the Windows Software
- Developer Kit (SDK) volume 2 and chapter 17 of "Programming Windows
- 2nd edition" by Charles Petzold.
-
-
- *********************************************************************
- SERVER SPECIFICATION
- *********************************************************************
-
- GENERAL METHODOLOGY
- -------------------
-
- PC Bible Atlas supports "cold" DDE links. Cold links allow
- information to be passed from one application to another without any
- additional updating being required or requested. Warm links and hot
- links are not required and are not supported.
-
- PC Bible Atlas responds to the application name "PCBAWIN" and the
- topic name of "Commands." PC Bible Atlas primarily uses the
- WM_DDE_EXECUTE command and responds to a variety of instructions
- (also called commands) passed with the WM_DDE_EXECUTE command.
-
- PC Bible Atlas responds to all WM_DDE_EXECUTE messages with a
- WM_DDE_ACK acknowledgement. A negative acknowledgement is sent if the
- command could not be completed; a positive acknowledgement indicates
- that the command was completed.
-
- SPECIFICATION FOR WM_DDE_EXECUTE
- --------------------------------
-
- The WM_DDE_EXECUTE message is used to pass commands to PC Bible Atlas.
- These commands can cause PCBA/Win to perform a specific action (such
- as a search for a location) or to provide information back to the
- caller (such as a version number). In all cases, the item string
- contains the command string. The command string is one or more
- execute commands and any of their associated parameters.
-
- The following execute commands are supported. The Syntax Version
- column specifies the syntax version of each command, and the Program
- Version column indicates which version of PC Bible Atlas first supported
- the command. Detailed descriptions of these command are provided in a
- later section.
-
- Syntax Program
- Execute Command Version Version
- --------------------------------------------------------
- [Minimize] 1 1.0c
- [Activate] 1 1.0c
- [Show("location name")] 1 1.0c
- [LoadProgVersion(hmem)] 1 1.0c
- [LoadSyntaxVersion(hmem)] 1 1.0c
-
- The syntax version is used to inform the client application about the
- commands that are supported by the running version of PCBA/Win. For
- instance, if a client application wants to send a "level 2 syntax"
- command to PC Bible Atlas, it may first determine if it supports that
- level of syntax. All levels are "backwards" compatible, so a program
- capable of support level 2 syntax also supports all level 0 and level
- 1 commands.
-
- Each command must be enclosed by brackets [ ] and each command may be
- separated by a space. Spaces within each command are not allowed,
- except in quoted strings. Parenthesis ( ) are used to begin and end
- the parameter list. All parameters are passed as strings and decoded
- depending upon the execute command. String parameters are expected to
- be enclosed by double-quotes, so the string parameter may not contain
- a double quote character. Parenthesis within quoted parameters are
- allowed.
-
- Multiple commands may be passed in one command string. For instance,
- to both activate PC Bible Atlas and ask it to search for the location
- Jerusalem, the following command string could be used
-
- [Activate][Show("Jerusalem")]
-
- if multiple commands are contained in one item, the commands will be
- processed from left to right. The process will abort and return a
- negative acknowledgement immediately upon encountering an error. That
- is, if the command string is
-
- [Activate][Show("Jerusalem")]
-
- and the activation can not be performed, then the Show command will
- never be executed.
-
- Additional details about each command are provided below.
-
- Application: PCBAWIN
- Topic: Commands
- Item: [Minimize]
- Example: [Minimize]
- Syntax Level: 1
-
- This command causes the whole PC Bible Atlas application to be
- minimized (i.e. made into an icon), but does not activate it.
-
- Application: PCBAWIN
- Topic: Commands
- Item: [Activate]
- Example: [Activate]
- Syntax Level: 1
-
- This command causes PC Bible Atlas to be activated. If it is
- minimized, it is also restored to normal size.
-
- Application: PCBAWIN
- Topic: Commands
- Item: [Show("location name")]
- Example: [Activate][Show("Jerusalem")]
- Syntax Level: 1
-
- This command is used to cause PC Bible Atlas to locate the
- maps containing the specified location. A list of maps
- containing the location is displayed, and the user can
- select which map to view the location on.
-
- The phrase is passed as a string, so it must be enclosed by
- double-quotes.
-
- It is typical to use the Activate command with this message to
- ensure that PC Bible Atlas for windows is activated following
- the search.
-
- Application: PCBAWIN
- Topic: Commands
- Item: [LoadProgVersion(hmem)]
- Example: [LoadProgVersion(1234)]
- Syntax Level: 1
-
- This command causes PC Bible Atlas to load the string
- identified by the memory handle "hmem" with the version of
- PC Bible Atlas that is running. hmem is converted from a
- string value into an unsigned integer (memory handle) with
- little error checking provided. An error occurs if hmem is
- not a valid memory handle, or if the memory it references is
- not large enough to contain the version string. The version
- string is something like "1.0c" where 1.0 is the major version
- number and the last letter is the minor revision letter.
-
- Application: PCBAWIN
- Topic: Commands
- Item: [LoadSyntaxVersion(hmem)]
- Example: [LoadSyntaxVersion(1234)]
- Syntax Level: 1
-
- This command causes PC Bible Atlas to load the syntax version
- that it supports into the memory identified by "hmem." hmem
- is converted from a string value into an unsigned integer
- (memory handle) with little error checking provided. An error
- occurs if hmem is not a valid memory handle. The memory
- identified is loaded with an integer value (i.e. not a string
- representation of an integer) such as 1, 2, etc.
-
- It is recommended that client applications use this command to
- determine if PC Bible Atlas supports the commands that the
- client supports or requires.
-
- As previously noted, PC Bible Atlas will respond to the WM_DDE_EXECUTE
- messages with a WM_DDE_ACK message. A positive acknowledgement is
- sent when the command was successful; a negative acknowledgement is
- sent otherwise. Information about the WM_DDE_ACK message and error
- handling is provided in a following section.
-
- Additional commands may be added in later editions of PC Bible Atlas.
- If so, these commands will be identified with a new syntax version.
- This allows a client application to determine which commands are
- available before trying to use one.
-
- ERROR HANDLING
- --------------
-
- The client application can generally rely upon PC Bible Atlas to
- display an error message that describes the error condition.
-
- In addition, PC Bible Atlas responds to all WM_DDE_EXECUTE messages
- with a WM_DDE_ACK message. A DDEACK structure accompanies the
- acknowledge message. This structure contains 3 fields of interest:
- fAck, fBusy, and bAppReturnCode. The fAck flag contains the
- acknowledgement. A positive acknowledgement is sent if the command
- string was completely executed; otherwise a negative acknowledgement
- is sent. The remaining two fields contain information about the
- failure, since there may be many reasons that the commands were not
- completed.
-
- The client application should not assume that the command was
- unrecognized if a negative acknowledgement was received. If a
- negative acknowledgement is received, the client application should
- first examine the fBusy flag. If this flag is set, then PC Bible
- Atlas did not execute the commands because it was busy. PC Bible
- Atlas can be "busy" when it is in a modal state (i.e. when an error
- message or modal dialog box is displayed) or when under any other
- condition when it is unable to process the DDE command due to the
- state of the program.
-
- The bAppReturnCode field is used to contain additional information
- about why a negative acknowledgement was received. PC Bible Atlas
- does not current use this field so its value is undefined.
-
-
- *********************************************************************
- CLIENT SPECIFICATION
- *********************************************************************
-
- GENERAL METHODOLOGY
- -------------------
-
- PC Bible Atlas can serve as a DDE client application and pass instructions
- to other applications with the WM_DDE_EXECUTE command.
-
- SPECIFICATION FOR THE INTERFACE TO A BIBLE PROGRAM
- --------------------------------------------------
-
- A PC Bible Atlas user can choose the Bible Study program that PC Bible
- Atlas interacts with. While this is designed to allow interaction
- with QuickVerse for Windows (version 1.0i and newer), any Bible Study
- package that supports the following WM_DDE_EXECUTE commands can be
- used.
-
- Application: User defined
- Topic name: Verses
-
- Syntax Program Version
- Item Level Used In
- ------------------------------------------------------------
- [Activate] 1 1.0c
- [QuickSearch("phrase")] 1 1.0c
- [RefSearch("reference")] 1 1.0c
- [GoTo("ref")] 1 1.0c
- [LoadCurrentTranslation(hmem) 1 1.0c
-
- Refer to the DDE Specification for QuickVerse for Windows for more
- detail regarding these specific commands.
-
- One important note is that PC Bible Atlas expects a WM_DDE_ACK message
- to be received within a specified period after sending the execute
- command. If the message is not received, PC Bible Atlas will issue a
- time-out and report that the operation has failed.
-
- PC Bible Atlas checks the returned acknowledgement for a positive or
- negative acknowledgement, as well as the busy flag as appropriate. It
- does not check the bAppReturnCode flag.
-
- SPECIFICATION FOR THE INTERFACE TO A BIBLE DICTIONARY
- -----------------------------------------------------
-
- A PC Bible Atlas user can choose the dictionary program that PC Bible Atlas
- interacts with. While PC Bible Atlas is designed to be used with the
- Holman Bible Dictionary, any dictionary that supports the following
- WM_DDE_EXECUTE commands may be used.
-
- Application: User defined
- Topic name: Commands
-
- Syntax Program Version
- Item Level Used In
- ------------------------------------------------------------
- [Show("item")] 1 1.0i
- [Activate] 1 1.0i
- [LoadSyntaxVersion(hmem)] 1 1.0i
-
- Refer to the DDE Specification for the Holman Bible Dictionary
- for more detail regarding these specific commands.
-
- SPECIFICATION FOR THE INTERFACE TO THE QUICKVERSE LIBRARY
- ---------------------------------------------------------
-
- PC Bible Atlas is designed to be used with the QuickVerse Library,
- but it can be used with any reference library that supports
- the following commands.
-
- Application: User defined
- Topic name: Commands
-
- Syntax Program Version
- Item Level Used In
- ------------------------------------------------------------
- [Activate] 1 1.0j
- [WordSearch("word","language")] 1 1.0j
- [WordSync("word")] 1 1.0j
- [VerseSearch("ref")] 1 1.0j
- [VerseSync("ref")] 1 1.0j
-
- Refer to the DDE Specification for the QuickVerse Library
- for more detail regarding these specific commands.
-
-
-
-